<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<html>
<head>
<title>物料采购单</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>

<body>
<div align="center">

<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="table2" width="840">
	<tr>
		<td align="right" width="840" colspan="6">
		<p align="center"><h2 align="center"><font color="#008000">{[$title]}</font></h2></td>
	</tr>
	<tr>
		<td align="right" width="120">编号：</td>
		<td width="200">{[$result.code]}</td>
		<td align="right" width="100">状态：</td>
		<td width="160">{[$result.status_t]}</td>
		<td align="right" width="100">创建时间：</td>
		<td width="160">{[$result.createtime]}</td>
	</tr>
	<tr>
		<td align="right">标题：</td>
		<td colspan="3">{[$result.name]}</td>
		<td align="right">申请人：</td>
		<td>{[$result.applicant_t]}</td>
	</tr>
	<tr>
		<td align="right">交货地址：</td>
		<td colspan="3">{[$result.address]}</td>
		<td align="right">交货时间：</td>
		<td>{[$result.date]}</td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3">{[$result.content|nl2br]}</td>
		<td align="right">用于产品：</td>
		<td>{[$result.mold_t]}</td>
	</tr>
</table>
	
<br/>
<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="table4" width="840">
	<tr>
		<td align="center" colspan="7">物料明细</td>
	</tr>
	<tr align="center">
		<td width="70">序号</td>
		<td width="120">编号</td>
		<td width="250">名称</td>

		<td width="100">单位</td>
		<td width="100">单价</td>
		<td width="100">数量</td>
		
		<td width="100">总价</td>
	</tr>
	{[foreach name=outer key=key item=item from=$record_in]}
	{[assign var="no" value="`$key+$pager->from+1`"]}
	{[assign var="total" value="`$item.amount*$item.price`"]} 
	{[assign var="totals" value="`$totals+$total`"]}
	<tr align="center">
		<td>{[$no]}</td>
		<td>{[$item.material_o.code]}</td>
		<td>{[$item.material_o.name]}</td>

		<td>{[$item.material_o.unit]}</td>
		<td>{[$item.price]}</td>
		<td>{[$item.amount]}</td>
		
		<td>{[$total|string_format:"%.2f"]}</td>
	</tr>
	{[/foreach]}
	<tr>
		<td colspan="5"></td>
		<td align="center">合计</td>
		<td align="center">{[$totals|string_format:"%.2f"]}</td>
	</tr>
</table>

{[if $result.status lt 20]}
<br/>
<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="table5" width="840">
	<tr>
		<td align="center" colspan="6">签字栏</td>
	</tr>
	<tr>
		<td width="140">
		申请人： 
		<p>&nbsp;</td>
		<td width="140">
		部门（负责人）： 
		<p>&nbsp;</td>
		<td width="140">
		审核人： 
		<p>&nbsp;</td>
		<td width="140">
		采购（负责人）：<p>&nbsp;</td>
		<td width="140">
		财务（负责人）：<p>&nbsp;</td>
		<td width="140">
		仓库（负责人）：<p>&nbsp;</td>
	</tr>
</table>
{[/if]}

景荣精密产品（深圳）有限公司 打印人：{[$smarty.session.name]} 打印时间：{[$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"]}
</div>
</body>

</html>